package com.bawei.mall.product.remote;

import com.bawei.common.core.constant.ServiceNameConstants;
import com.bawei.common.core.domain.R;
import com.bawei.mall.product.factory.RemoteProductHotwordInfoFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * @Author：liurui
 * @Package：com.bawei.mall.product.remote
 * @Project：mall_cloud
 * @name：RemoteProductHotwordInfo
 */
@FeignClient(contextId = "RemoteProductHotwordInfoService", value = ServiceNameConstants.PRODUCT_SERVICE,
        fallbackFactory = RemoteProductHotwordInfoFallbackFactory.class,
        path = "/hotword")
public interface RemoteProductHotwordInfo {
    /**
     * 查询
     */
    @GetMapping("/find")
    public R<List<String>> find();
    /**
     * 添加
     */
    @PostMapping("/add")
    public R add(@RequestParam(value = "name") String name);
    /**
     * 修改->增加次数
     */
    @PostMapping("/update")
    public R update(@RequestParam(value = "id") Integer id);
}
